package com.meshnetics.gb.stack.mac.primitives;

import com.meshnetics.gb.stack.mac.RadioMACStackLayer;

import java.nio.ByteBuffer;

/**
 * WRITE DESCRIPTION HERE
 *
 * @author AKovylin
 */
public interface MACCommand {
    /**
     * Serializes parameters of command
     *
     * @param bb    ByteBuffer tyo serialize to
     * @param layer calling mac layer
     */
    void serialize(ByteBuffer bb, RadioMACStackLayer layer);

    /**
     * Returns size of frame in bytes without length and code.
     *
     * @return size of frame in bytes without length and code
     * @param layer
     */
    int getSize(RadioMACStackLayer layer);

    byte getCode();
}
